import Layout from '@/layout'
const initRouter = {
  path: '/init',
  component: Layout,
  redirect: '/init/group',
  alwaysShow: true,
  name: 'init',
  meta: {
    type: 'GI',
    roles: ['7010', '7020', '7030'],
    title: '初始化',
    icon: 'init'
  },
  children: [{
    path: 'book',
    component: () => import('@/views/init/book'),
    name: 'book',
    meta: {
      type: 'GI',
      roles: ['7010'],
      title: '建账'
    }
  }, {
    path: 'buildbook',
    component: () => import('@/views/init/buildbook'),
    name: 'buildbook',
    hidden: true,
    meta: {
      type: 'GI',
      roles: ['701010'],
      title: '新建账套'
    }
  }, {
    path: 'modifybook',
    component: () => import('@/views/init/buildbook'),
    name: 'buildbook',
    hidden: true,
    meta: {
      type: 'GI',
      roles: ['701020'],
      title: '编辑账套'
    }
  }, {
    path: 'import',
    component: () => import('@/views/init/import'),
    name: 'initImport',
    meta: {
      type: 'GI',
      roles: ['7040'],
      title: '导入'
    }
  }, {
    path: 'auxiliary',
    component: () => import('@/views/init/auxiliary'),
    name: 'auxiliaryData',
    meta: {
      type: 'GI',
      roles: ['7020'],
      title: '辅助核算'
    }
  }, {
    path: 'auxiliarydetail',
    component: () => import('@/views/init/auxiliarydetail'),
    name: 'auxiliarydetail',
    hidden: true,
    meta: {
      type: 'GI',
      roles: ['7020'],
      title: '辅助核算项'
    }
  }, {
    path: 'store',
    component: () => import('@/views/init/store'),
    name: 'initialStore',
    meta: {
      type: 'GI',
      roles: ['7040'],
      title: '期初库存'
    }
  }, {
    path: 'balance',
    component: () => import('@/views/init/balance'),
    name: 'initialBalance',
    meta: {
      type: 'GI',
      roles: ['7040'],
      title: '期初余额'
    }
  }]
}

export default initRouter
